package model;

import com.google.gson.Gson;

import net.ck.hzq.MyEarningsActivity;

public class EchartsDataBean {

    private static Gson gson;
    private static EchartsLineBean lineBean;
    private static EchartsDataBean echartsDataBean;

    private EchartsDataBean() {
    }

    public synchronized static EchartsDataBean getInstance() {
        if (echartsDataBean == null) {
            echartsDataBean = new EchartsDataBean();
            gson = new Gson();
            lineBean = new EchartsLineBean();
        }
        return echartsDataBean;
    }

    public String getEchartsLineJson() {

        lineBean.title = "123";
        lineBean.type = "line";
        lineBean.times = MyEarningsActivity.s;
        lineBean.steps = MyEarningsActivity.d;

        return gson.toJson(lineBean);
    }

}
